* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    background-image: linear-gradient(to bottom, #fff 0%, #fff 50%, pink 50%, pink 100%);
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav {
    padding: 5px;
    border: 2px solid #000;
    border-radius: 3px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, .4);
    width: 300px;
    height: 50px;
    display: flex;
    /* justify-content: space-around; */
    align-items: center;
    transform: rotate(360deg);
    transition: width 0.5s linear,transform 0.5s linear;
}

.nav ul {
    flex: 1;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav ul li {
    list-style: none;
}

.nav ul li a {
    text-decoration: none;
    color: #000;
    cursor: pointer;
}

.nav button {
    /* height: 50px; */
    width: 30px;
    background-color: #fff;
    border: 0;
    transform: scale(0.98);
}

.active {
    width: 40px;

    transition: width 0.5s linear;
    /* overflow: hidden; */
}

.active ul {
    display: none;
    transition: display 0.5s linear;
}